222 research outputs found
Delegation by Object Composition
AbstractClass inheritance and method overriding, as provided by standard class-based languages, are often not flexible enough to represent objects with some dynamic behavior. In this respect, object composition equipped with different forms of method body lookup is often advocated as a more flexible alternative to class inheritance since it takes place at run time, thus permitting the behavior of objects to be specialized dynamically. In this paper, we illustrate Incomplete Featherweight Java (IFJ), an extension of Featherweight Java with a novel linguistic construct, the incomplete object. Incomplete objects require some missing methods which can be provided at run time by composition with another (complete) object. Furthermore, we present two mechanisms for the method body lookup on (composed) objects, one based on delegation and the other based on consultation. Thanks to the design of the language, the consultation-based lookup is a simple extension of the delegation-based one. Both mechanisms are disciplined by static typing, therefore the language enjoys type safety (which implies no âmessage-not-understoodâ run-time errors) and avoids possible accidental overrides due to method name clashes
Towards Object-Oriented Klaim
Abstract By its own nature, mobile code requires flexibility in order to be adaptive to any execution context it may be run in. In this paper we investigate this flexibility requirement from the design point of view, and propose a solution based on the mixin technique to fulfill it. We also propose an extension of the language K laim with object-oriented features, as an application of this approach
A Typed Lambda Calculus with Intersection Types
AbstractIntersection types are well known to type theorists mainly for two reasons. Firstly, they type all and only the strongly normalizable lambda terms. Secondly, the intersection type operator is a meta-level operator, that is, there is no direct logical counterpart in the CurryâHoward isomorphism sense. In particular, its meta-level nature implies that it does not correspond to the intuitionistic conjunction.The intersection type system is naturally a type inference system (system Ă la Curry), but the meta-level nature of the intersection operator does not allow to easily design an equivalent typed system (system Ă la Church). There are many proposals in the literature to design such systems, but none of them gives an entirely satisfactory answer to the problem. In this paper, we will review the main results in the literature both on the logical interpretation of intersection types and on proposed typed lambda calculi.The core of this paper is a new proposal for a true intersection typed lambda calculus, without any meta-level notion. Namely, any typable term (in the intersection type inference) has a corresponding typed term (which is the same as the untyped term by erasing the type decorations and the typed term constructors) with the same type, and vice versa.The main idea is to introduce a relevant parallel term constructor which corresponds to the intersection type constructor, in such a way that terms in parallel share the same resources, that is, the same context of free typed variables. Three rules allow us to generate all typed terms. The first two rules, Application and Lambda-abstraction, are performed on all the components of a parallel term in a synchronized way. Finally, via the third rule of Local Renaming, once a free typed variable is bounded by lambda-abstraction, each of the terms in parallel can do its local renaming, with type refinement, of that particular resource
Mucoadhesive chitosan-methylcellulose oral patches for the treatment of local mouth bacterial infections
: Mucoadhesive buccal patches are dosage forms promising for successful drug delivery. They show the distinctive advantages of long residence time on the oral mucosa and increased in situ drug bioavailability. In this context, electrophoretic deposition (EPD) of chitosan (CS) has been demonstrated as a simple and easily tunable technique to produce mucoadhesive buccal patches. However, CS-based buccal patches may suffer from weak mucoadhesion, which can impair their therapeutic effect. In this work, methylcellulose (MC), a widely investigated biopolymer in the biomedical area, was exploited to increase the mucoadhesive characteristic of pristine CS patches. CS-MC patches were obtained in a one-pot process via EPD, and the possibility of incorporating gentamicin sulfate (GS) as a model of a broad-spectrum antibiotic in the so-obtained patches was investigated. The resulting CS-MC patches showed high stability in a water environment and superior mucoadhesive characteristic (Ïadh = 0.85 ± 0.26 kPa, Wadh = 1192.28 ± 602.36 Pa mm) when compared with the CS control samples (Ïadh = 0.42 ± 0.22 kPa, Wadh = 343.13 ± 268.89 Pa mm), due to both the control of the patch porosity and the bioadhesive nature of MC. Furthermore, GS-loaded patches showed no in vitro cytotoxic effects by challenging L929 cells with material extracts and noteworthy antibacterial activity on both Gram-positive and Gram-negative bacterial strains
Java & Lambda: a Featherweight Story
We present FJ&, a new core calculus that extends Featherweight Java
(FJ) with interfaces, supporting multiple inheritance in a restricted form,
-expressions, and intersection types. Our main goal is to formalise
how lambdas and intersection types are grafted on Java 8, by studying their
properties in a formal setting. We show how intersection types play a
significant role in several cases, in particular in the typecast of a
-expression and in the typing of conditional expressions. We also
embody interface \emph{default methods} in FJ&, since they increase
the dynamism of -expressions, by allowing these methods to be called
on -expressions.
The crucial point in Java 8 and in our calculus is that -expressions
can have various types according to the context requirements (target types):
indeed, Java code does not compile when -expressions come without
target types. In particular, in the operational semantics we must record target
types by decorating -expressions, otherwise they would be lost in the
runtime expressions.
We prove the subject reduction property and progress for the resulting
calculus, and we give a type inference algorithm that returns the type of a
given program if it is well typed. The design of FJ& has been driven
by the aim of making it a subset of Java 8, while preserving the elegance and
compactness of FJ. Indeed, FJ& programs are typed and behave the same
as Java programs
PRIMUS/Informed Cities: Making research work for local sustainability
The final report of a three year European Commission FP7 project
- âŠ